<template>
  <div id="app">
    <router-view/>
    <tabbar v-if="footShow"></tabbar>
  </div>
</template>

<script>
import {obj} from '../static/js/util.js'
import tabbar from './components/tabbar.vue'
export default {
  data(){
    return{
      footShow:true,
    }
  },
  watch:{
    $route(to,from){
      if(to.name=="home"|to.name=="menu"|to.name=="personal"|to.name=="market"|to.name=="city"){
        this.footShow=true;
      }else{
        this.footShow=false;
      }
    }
  },
  name: 'App',
    mounted(){
    obj.setRem(); //初始化字体大小
  },
components:{tabbar}
}
</script>

<style>
body{
  margin: 0;
  padding: 0;
}
#app {
  font-family: 'Avenir', Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  color: #2c3e50;
  font-size: .3rem;
}
</style>